/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package snippet.lab2;

/**
 *
 * @author hoang.pt
 */
public class Account {
    /**
     * 
     */
    int balance = 1000;

    /*
     * 
     */
    public synchronized void drawMoney(String name, int deposit) {
        int y = balance - deposit;

        System.out.println(name+ " is drawing " +deposit);
        this.balance = y;
    }

}
